package operate;

public class operator5 {
    public static void main(String[] args) {
        double size = 9.8;
        int storage =16;
        boolean rs = size >= 6.95 & storage >= 8;
        //&前后都是t，最后才是t
        System.out.println(rs);

        boolean rs2 = size >= 6.95 | storage >= 8;
        //多个条件满足一个就是t
        System.out.println(rs2);

        System.out.println(!true);
        System.out.println(!false);
        System.out.println(2 > 1);//!取反
        System.out.println(true ^ true);
        System.out.println(false ^ false);
        System.out.println(true ^ false);
        System.out.println(false ^ true);
        //^前后结果相同时返回false，不同时返回true


        int i = 10;
        int j = 20;
        System.out.println(i > 100 && ++j > 99);
        System.out.println(j);



    }
}
